import requests
import json


def send_dingding_message():
    HEADERS = {
        "Content-Type": "application/json ;charset=utf-8 "
    }
    webhook_url = 'https://oapi.dingtalk.com/robot/send?access_token=f6ef5d2ece98c7ae56f54de09c3c4e103c1c496faec6b1dadb640dda957b706e'
    String_textMsg = {"msgtype": "text",
                      "text": {"content": '退件订单异常'},
                      "at": {"atMobiles": ['15867710780']}
                      }
    String_textMsg = json.dumps(String_textMsg)
    requests.post(webhook_url, data=String_textMsg, headers=HEADERS)
